
<?php

header("content-type:text/html; charset=utf-8");
function convert2utf8($string)
{
   return iconv("gbk","utf-8",$string);
}
function convert2gbk($string)
{
   return iconv("utf-8","gbk",$string);
}

$server = "127.0.0.1";
$username = "sa";
$password = "123456";
$db = "test";

$sqlcon = mssql_pconnect($server,$username,$password);
if (!$sqlcon)
{
	die('Could not connect: ' . convert2utf8(mssql_get_last_message()));
}
mssql_select_db($db, $sqlcon) or 	die('Could not connect: ' . convert2utf8(mssql_get_last_message()));; 

?> 


